<?php

namespace app\admin\controller;

use think\facade\Request;
use app\admin\service\ExportService;
use app\common\Common;

// 记录管理
class Export extends Base
{
    private $service;

    public function __construct(ExportService $service)
    {
        $this->service = $service;
    }

    // 投放总览导出
    public function launchOverviewExport()
    {
        $params = Request::param();
        $this->service->launchOverviewExport($params);
        return Common::success();
    }

    // 投放总览查看导出
    public function launchOverviewViewExport()
    {
        $params = Request::param();
        $this->service->launchOverviewViewExport($params);
        return Common::success();
    }

    // 投手统计按月份查看导出
    public function byMonthViewExport()
    {
        $params = Request::param();
        $this->service->byMonthViewExport($params);
        return Common::success();
    }

    // 按投手搜索查看导出
    public function bySearchViewExport()
    {
        $params = Request::param();
        $this->service->bySearchViewExport($params);
        return Common::success();
    }
}